package com.lzh.article.feign;

import com.lzh.article.entity.ApAuthor;
import com.lzh.common.pojo.Result;
import com.lzh.core.feign.CoreFeign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author lizuhu
 * @date 2021/6/26 10:55
 */
@FeignClient(name = "leadnews-article",path = "/apAuthor")
public interface ApAuthorFeign extends CoreFeign<ApAuthor> {
    /**
     * 根据ApUser 的id获取作者
     * @param id
     * @return
     */
    @GetMapping("/one")
    public ApAuthor getByUserId(@RequestParam(value = "id") Integer id);

    /**
     * 添加作者
     * @param apAuthor
     * @return
     */
//    @PostMapping("/save")
//    public Result insert(@RequestBody ApAuthor apAuthor);
}
